﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Common/Master/FrameMain.Master"
    AutoEventWireup="true" CodeBehind="DealtList.aspx.cs" Inherits="Jzy.Web.WorkFlow.Fore.DealtList" %>

<%@ Register Src="../../Common/Controls/Pager.ascx" TagName="Pager" TagPrefix="uc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>已办件列表</title>

    <script type="text/javascript">
        function tab_click(sender, index)
        {
            var li = sender.parentNode;
            var lis = sender.parentNode.parentNode.getElementsByTagName("li");
            if (li.className != "on")
            {
                for (var i = 0; i < lis.length; i++)
                {
                    if (lis[i].className == "on")
                    {
                        lis[i].className = "";
                    }
                    document.getElementById("tbl" + i).style.display = "none";
                }
                li.className = "on";
                document.getElementById("tbl" + index).style.display = "";
            }
            sender.blur();
        }
    </script>

    <style type="text/css">
        .style1
        {
            width: 50px;
            text-align: center;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="top_daohang" class="tab" style="margin-top: 10px;">
        <ul>
            <asp:Repeater ID="rpt" runat="server">
                <ItemTemplate>
                    <li class='<%#GetClassName(Eval("ID")) %>'>
                        <div class="menu_l">
                        </div>
                        <div class="menu_r">
                        </div>
                        <a href='DealtList.aspx?TabIndex=<%#Eval("ID") %>'>
                            <%#Eval("Name") %></a> </li>
                </ItemTemplate>
            </asp:Repeater>
        </ul>
    </div>
    <div id="head">
        <div class="left">
            <asp:Label ID="Label1" runat="server" Text="查看：" Font-Bold="true"></asp:Label>
            <asp:Repeater ID="rptState" runat="server" OnItemCommand="rptState_ItemCommand">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" Style="color: #999999" CommandArgument='<%#Eval("ID") %>'><%#Eval("Name") %></asp:LinkButton></ItemTemplate>
                <SeparatorTemplate>
                    -
                </SeparatorTemplate>
            </asp:Repeater>
        </div>
    </div>
    <asp:Panel ID="pnlState" runat="server" Width="100%" CssClass="message" Visible="false">
        <asp:Label ID="Label6" runat="server" Text="当前查看的状态是："></asp:Label>
        <asp:Label ID="lblState" runat="server" Text="Label"></asp:Label></asp:Panel>
    <div id="list">
        <asp:PlaceHolder ID="holder0" runat="server">
            <table id="tbl0" cellpadding="0" cellspacing="0" border="0" width="100%">
                <tr id="lvHeader0" runat="server">
                    <th class="sp">
                        &nbsp;
                    </th>
                    <th class="style1" style="text-align: center;">
                        流水号
                    </th>
                    <th>
                        主题
                    </th>
                    <th>
                        拟稿时间
                    </th>
                    <th>
                        当前节点
                    </th>
                    <th>
                        状态
                    </th>
                    <th>
                        命令
                    </th>
                </tr>
                <asp:ListView ID="lv0" runat="server" ItemPlaceholderID="items" OnItemCommand="lv0_ItemCommand"
                    OnItemDataBound="lv0_ItemDataBound">
                    <LayoutTemplate>
                        <tr id="items" runat="server">
                        </tr>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr id="row" runat="server">
                            <td class="sp">
                                &nbsp;
                            </td>
                            <td class="style1">
                                <%#GetForm(Eval("FormInfo")).ID %>
                            </td>
                            <td>
                                <a href="FormDetail.aspx?TaskID=<%#Eval("ID")%>&FlowID=<%#Eval("FlowID") %>">
                                    <%#GetForm(Eval("FormInfo")).Name %></a>
                            </td>
                            <td>
                                <%#GetForm(Eval("FormInfo")).InputTime %>
                            </td>
                            <td>
                                <%#GetForm(Eval("FormInfo")).CurrentNodeName%>&nbsp;
                            </td>
                            <td>
                                <%#(Jzy.Workflow.Form.FormState)GetForm(Eval("FormInfo")).State%>
                            </td>
                            <td>
                                <asp:LinkButton ID="btnOperate" runat="server">暂停办理</asp:LinkButton>&nbsp;
                            </td>
                        </tr>
                    </ItemTemplate>
                    <EmptyDataTemplate>
                        <tr>
                            <td colspan="7" class="empty">
                                没有表单数据
                            </td>
                        </tr>
                    </EmptyDataTemplate>
                </asp:ListView>
            </table>
        </asp:PlaceHolder>
        <asp:PlaceHolder ID="holder1" runat="server">
            <table id="tbl1" cellpadding="0" cellspacing="0" border="0" width="100%">
                <tr id="lvHeader1" runat="server">
                    <th class="sp">
                        &nbsp;
                    </th>
                    <th class="style1" style="text-align: center;">
                        流水号
                    </th>
                    <th>
                        主题
                    </th>
                    <th>
                        拟稿人
                    </th>
                    <th>
                        拟稿时间
                    </th>
                    <th>
                        到达时间
                    </th>
                    <th>
                        处理时间
                    </th>
                    <th>
                        当前节点
                    </th>
                    <th>
                        状态
                    </th>
                    <th>
                        任务来源
                    </th>
                </tr>
                <asp:ListView ID="lv1" runat="server" ItemPlaceholderID="items">
                    <LayoutTemplate>
                        <tr id="items" runat="server">
                        </tr>
                    </LayoutTemplate>
                    <ItemTemplate>
                        <tr id="row" runat="server">
                            <td class="sp">
                                &nbsp;
                            </td>
                            <td class="style1">
                                <%#GetForm(Eval("FormInfo")).ID %>
                            </td>
                            <td>
                                <a href="FormDetail.aspx?TaskID=<%#Eval("ID")%>&FlowID=<%#Eval("FlowID") %>">
                                    <%#GetForm(Eval("FormInfo")).Name %></a>
                            </td>
                            <td>
                                <%#GetForm(Eval("FormInfo")).CreatorName %>
                            </td>
                            <td>
                                <%#GetForm(Eval("FormInfo")).InputTime %>
                            </td>
                            <td>
                                <%#Eval("SendTime") %>
                            </td>
                            <td>
                                <%#Eval("FinishTime") %>
                            </td>
                            <td>
                                <%#GetForm(Eval("FormInfo")).CurrentNodeName%>&nbsp;
                            </td>
                            <td>
                                <%#(Jzy.Workflow.Form.FormState)GetForm(Eval("FormInfo")).State%>
                            </td>
                            <td>
                                <%# (Jzy.Workflow.Task.FromType)Eval("FromType") %>
                            </td>
                        </tr>
                    </ItemTemplate>
                    <EmptyDataTemplate>
                        <tr>
                            <td colspan="10" class="empty">
                                没有表单数据
                            </td>
                        </tr>
                    </EmptyDataTemplate>
                </asp:ListView>
            </table>
        </asp:PlaceHolder>
    </div>
    <div id="foot">
        <uc1:Pager ID="Pager1" runat="server" />
    </div>

    <script type="text/javascript">
        //tab_click(document.getElementById("lnk_<%=TabIndex %>"), <%=TabIndex %>);
    </script>

</asp:Content>
